• 0 Votes
    4 Posts
    1k Views
    G

    @escc1986 i'm sure it's possible to optimize the new 3d engine for the pi4, as the emulator itself is currently using the old 3d engine only for pi4... someone could modify the open-source supermodel code if they had the skill.

  • SD Failure or v3d_freq Settings?

    Help and Support
    8
    0 Votes
    8 Posts
    2k Views
    RiverstormR

    It should be printed on the PCB along the edge.

    If not look here. It requires a few extra steps in the way of running a few commands but you can get details as to what factory it was made in even. Like Embest, China or Sony, UK.

    https://www.raspberrypi-spy.co.uk/2012/09/checking-your-raspberry-pi-board-version/

  • 0 Votes
    1 Posts
    380 Views
    No one has replied
  • 0 Votes
    4 Posts
    1k Views
    TheBattleMasterT

    @mitu
    Thanks for the reply!
    I do have a normal TV, the problem is that the HDMI cables I've ordered along with the pi 4 don't work. I'll have to order new ones to test at a later date.
    The reason I just kept working on with this screen was that I wanted to build a small (4:3) bar top arcade with it.
    Now, knowing that this screen won't work for this, I'll have to research for a suitable replacement as well.
    Thanks for the help :)

  • 0 Votes
    9 Posts
    4k Views
    keks24K

    @mitu said in Trouble with RetroPie after updating from Stretch to Buster:

    @keks24 said in Trouble with RetroPie after updating from Stretch to Buster:

    Could you elaborate this and provide some references, please?

    I think every new Raspberry Pi OS (was Raspbian once) mentions this in their release notes. For instance, for the Buster release:

    We do not recommend upgrading an existing Stretch (or earlier) system to Buster – we can’t know what changes everyone has made to their system, and so have no idea what may break when you move to Buster. However, we have tested the following procedure for upgrading, and it works on a clean version of the last Stretch image we released. That does not guarantee it will work on your system, and we cannot provide support (or be held responsible) for any problems that arise if you try it.

    Ah, thank you for the link!

    In my opinion, they are making it a little bit easy on themselves here, but I guess, that they do not want to let the (normal) user go through the entire partitioning resizing process of /boot/ here.

    They also increased the partition of their official images, due to the large kernel files of Debian Buster:

    $ fdisk --list * | grep "Device\|img1" | column -t Device Boot Start End Sectors Size Id Type 2020-12-02-raspios-buster-armhf-full.img1 8192 532479 524288 256M c W95 FAT32 (LBA) Device Boot Start End Sectors Size Id Type 2020-12-02-raspios-buster-armhf.img1 8192 532479 524288 256M c W95 FAT32 (LBA) Device Boot Start End Sectors Size Id Type 2020-12-02-raspios-buster-armhf-lite.img1 8192 532479 524288 256M c W95 FAT32 (LBA) (retropie) $ df --human-readable /boot Filesystem Size Used Avail Use% Mounted on /dev/mmcblk0p1 512M 47M 466M 10% /boot
  • 0 Votes
    30 Posts
    5k Views
    M

    Please forgive me for replying in an older topic, but I just had to thank barbudreadmon for his explanation on "how to use cheat codes with FBneo." I've been on youtube, tons of forums and could only get .cht's to work but not the .ini files. Some very smart folks here....... Thank you so much :D.

  • 0 Votes
    21 Posts
    4k Views
    E

    @barbudreadmon

    Thank you

    i just posted a issue on that github page as you recommended

    thank you for the suggesting

    https://github.com/libretro/flycast/issues/950
    .
    .
    .
    .
    thanks for informing me regarding jpark sequels ... bummer pi can not support them at this time
    .
    .
    .
    .
    yabasanshiro standalone is the best recommadtion , thanks again .. always like to ask about saturn because everyone has there own opinion on what they choosh ... hopefully we get a better saturn core on pi 4 this year or years to come :)

  • 0 Votes
    3 Posts
    410 Views
    F

    @mitu I've tried both .bin and .zip, the hash file for astrocde says .bin files as well as all the BIOS files zipped in the roms directory as well as being in the main BIOS directory. Still no dice.

  • 0 Votes
    5 Posts
    1k Views
    E

    It was nice to get the Dolphen bar wiimote to work on the game

    Unfortunately I think the game may not be complete or fully compatible on the Pi 4 Flycast

    I have tried a few different sites to get this title

    I get kick out of the game on the first level with these jumping ninjas

    Tried many attempts times but can not get past the first level

    Such a fun experience this game is .... sad I can't fully play it on the Pi 4 without the crash

    Or if someone has a recommendation or tips please don't hesitate to inform

    Thank you

  • 0 Votes
    3 Posts
    366 Views
    mituM

    @ReadyPlayaWon said in .mu3 multidisc PSX does not work:

    it needs to be .m3u ... not .mu3

    I think that was just a typo, the screenshot shows the file as .m3u and the file is also listed in the EmulationStation's gamelist (so the extension is picked up).

    @neogeo1981 - can you double check the extension of your .cd1/.cd2 files and make sure there's not a .cue present ? The OS might hide the extension and this might explain why they still show up in the list.

  • Pi 4 : Powerd by PC Question

    Help and Support
    3
    0 Votes
    3 Posts
    156 Views
    E

    @YFZdude

    Very useful information and I very well understand

    Thank you for bringing all that to my attention

    Lucky enough I haven't play any games

    I was mainly planning on , tweaking it , downloading and loading stuff into it meanwhile before i get the proper power adapter

    Thanks again for the info

  • 0 Votes
    9 Posts
    10k Views
    R

    @YFZdude Alright man you are the winner, I had been doing config edits all day yesterday and tried both HDMI-D ports during those edits, and at some point at the end of the night when I did the hdmi_group 1 and hdmi_mode 16 edits I did not test the cord in the primary hdmi-d slot as I had thought.
    It figures the one edit I added in that actually works is the one I stopped testing both slots on.

    I have the pi 4 in a case so remembering which slot was the primary was my user error.
    What a nightmarish night for something so simple, thanks again to everyone in here that helped out. It runs in 1080p now.

    Edit: The resolution to the problem was having the hdmi cord plugged into the primary slot (nearest the usb hub) on the pi 4. User error.

  • 0 Votes
    1 Posts
    329 Views
    No one has replied
  • 0 Votes
    4 Posts
    151 Views
    E

    Thank you both for providing me more info and links for the pi4

    I will certainly be checking out all my options you both have described

    Thank you very much for the help

  • 0 Votes
    1 Posts
    150 Views
    No one has replied
  • Is scraping broken right now?

    Help and Support
    5
    0 Votes
    5 Posts
    401 Views
    IanDaemonI

    If you have more than one RPi setup then you can simply copy files instead of re-scraping. (And you can create or "tweak" images/text.)

  • 2 Votes
    136 Posts
    31k Views
    P

    @bluestang On the Amiberry front, worried I'd have to go off and compile the binary and fiddle around with symlinks and that kind of thing. Turns out, just reinstalling automatically builds the SDL2 version.

    Screen tearing I was seeing in Redream seems to be eliminated! Gonna test out Flycast some more too to see if performance has improved.

  • 0 Votes
    4 Posts
    1k Views
    westopherW

    @nateo44 While the original poster here said it didn't work for them, the only way I was able to solve this issue is to update xpad from source individually, even after doing a full update of the entire system the usual way. From inside of EmulationStation, choose RetroPie, then: RetroPie Setup, Manage Packages, Manage Driver Packages, xpad, then Update (from source). I'd restart the entire system afterward. Once that's done, go back into EmulationStation, hit Start, choose Configure Input, and go through all the mapping again for each side of your X-Arcade Tankstick. Note that this is with the unit in Mode 4 on a newer Tri-Mode Tankstick unit. Worked for me; YMMV.

    No idea if it's unique to a Pi 4, or what the deal is, but it was the only method I could find for getting LT and RT buttons to work properly.

  • 3 Votes
    97 Posts
    24k Views
    B

    Updating this thread for informational purposes:

    If you want to run the latest MESA git, there are several patches that are needed based on the 20.3.5 diff file from the RPiOS repository: (I kept the relevant changes that are not already upstreamed)

    Without it, I ran into some display issues which I presume are the modifiers utilized in the newer libdrm pkgs.

    Note: you must compile libdrm, libglvnd, and mesa for it to work.

    diff --git a/src/gallium/drivers/v3d/driinfo_v3d.h b/src/gallium/drivers/v3d/driinfo_v3d.h index 147ad0b49bd..a524a03e7e5 100644 --- a/src/gallium/drivers/v3d/driinfo_v3d.h +++ b/src/gallium/drivers/v3d/driinfo_v3d.h @@ -2,4 +2,6 @@ DRI_CONF_SECTION_MISCELLANEOUS DRI_CONF_V3D_NONMSAA_TEXTURE_SIZE_LIMIT(false) + DRI_CONF_V3D_MAINTAIN_IGNORABLE_SCANOUT(false) + DRI_CONF_V3D_IGNORE_SCANOUT_USAGES_WITH_MODIFIERS(false) DRI_CONF_SECTION_END diff --git a/src/gallium/drivers/v3d/meson.build b/src/gallium/drivers/v3d/meson.build index b760ca5c025..1a537637b03 100644 --- a/src/gallium/drivers/v3d/meson.build +++ b/src/gallium/drivers/v3d/meson.build @@ -59,6 +59,16 @@ endif v3d_versions = ['33', '41'] +v3d_deps = [dep_v3dv3, dep_libdrm, dep_valgrind, idep_nir_headers] + +if with_platform_x11 + v3d_deps += dep_xcb +endif + +if with_platform_wayland + v3d_deps += dep_wayland_client +endif + per_version_libs = [] foreach ver : v3d_versions per_version_libs += static_library( @@ -70,7 +80,7 @@ foreach ver : v3d_versions ], c_args : [v3d_args, '-DV3D_VERSION=' + ver], gnu_symbol_visibility : 'hidden', - dependencies : [dep_v3dv3, dep_libdrm, dep_valgrind, idep_nir_headers], + dependencies : v3d_deps, ) endforeach @@ -93,7 +103,7 @@ libv3d = static_library( c_args : [v3d_args], cpp_args : [v3d_args], gnu_symbol_visibility : 'hidden', - dependencies : [dep_v3dv3, dep_libdrm, dep_valgrind, idep_nir_headers], + dependencies : v3d_deps, link_with: [per_version_libs], ) diff --git a/src/gallium/drivers/v3d/v3d_resource.c b/src/gallium/drivers/v3d/v3d_resource.c index 0885a2cb80f..36b6ab34d71 100644 --- a/src/gallium/drivers/v3d/v3d_resource.c +++ b/src/gallium/drivers/v3d/v3d_resource.c @@ -436,7 +436,7 @@ v3d_resource_get_handle(struct pipe_screen *pscreen, case WINSYS_HANDLE_TYPE_SHARED: return v3d_bo_flink(bo, &whandle->handle); case WINSYS_HANDLE_TYPE_KMS: - if (screen->ro) { + if (screen->ro && rsc->scanout) { if (renderonly_get_handle(rsc->scanout, whandle)) { whandle->stride = rsc->slices[0].stride; return true; @@ -750,6 +750,30 @@ v3d_resource_setup(struct pipe_screen *pscreen, return rsc; } +static bool +v3d_resource_should_scanout(struct pipe_screen *pscreen, + const struct pipe_resource *tmpl, + const uint64_t *modifiers, + int count) +{ + struct v3d_screen *screen = v3d_screen(pscreen); + + if (tmpl->bind & PIPE_BIND_SCANOUT) { + if (screen->maintain_ignorable_scanout) + return true; + if (screen->has_x_session && screen->ignore_scanout_usages) + return false; + return true; + } + + if (tmpl->bind & PIPE_BIND_SHARED) { + if (screen->ignore_scanout_usages_with_modifiers) + return false; + return true; + } + return false; +} + static struct pipe_resource * v3d_resource_create_with_modifiers(struct pipe_screen *pscreen, const struct pipe_resource *tmpl, @@ -763,6 +787,8 @@ v3d_resource_create_with_modifiers(struct pipe_screen *pscreen, struct pipe_resource *prsc = &rsc->base; /* Use a tiled layout if we can, for better 3D performance. */ bool should_tile = true; + bool should_scanout = v3d_resource_should_scanout(pscreen, tmpl, + modifiers, count); /* VBOs/PBOs are untiled (and 1 height). */ if (tmpl->target == PIPE_BUFFER) @@ -788,8 +814,8 @@ v3d_resource_create_with_modifiers(struct pipe_screen *pscreen, /* If using the old-school SCANOUT flag, we don't know what the screen * might support other than linear. Just force linear. */ - if (tmpl->bind & PIPE_BIND_SCANOUT) - should_tile = false; + if ((tmpl->bind & PIPE_BIND_SCANOUT) && should_scanout) + should_tile = false; /* No user-specified modifier; determine our own. */ if (count == 1 && modifiers[0] == DRM_FORMAT_MOD_INVALID) { @@ -818,8 +844,8 @@ v3d_resource_create_with_modifiers(struct pipe_screen *pscreen, * We always allocate this way for SHARED, because get_handle will * need a resource on the display fd. */ - if (screen->ro && (tmpl->bind & (PIPE_BIND_SCANOUT | - PIPE_BIND_SHARED))) { + + if (screen->ro && should_scanout) { struct winsys_handle handle; struct pipe_resource scanout_tmpl = { .target = prsc->target, @@ -949,7 +975,7 @@ v3d_resource_from_handle(struct pipe_screen *pscreen, } } - if (screen->ro) { + if (screen->ro && !rsc->tiled) { /* Make sure that renderonly has a handle to our buffer in the * display's fd, so that a later renderonly_get_handle() * returns correct handles or GEM names. @@ -995,7 +1021,9 @@ v3d_update_shadow_texture(struct pipe_context *pctx, assert(view->texture != pview->texture); - if (shadow->writes == orig->writes && orig->bo->private) + if (shadow->writes == orig->writes && + orig->base.sync_status == 0 && + (orig->bo->private || orig->base.sync_condition)) return; perf_debug("Updating %dx%d@%d shadow for linear texture\n", @@ -1038,6 +1066,7 @@ v3d_update_shadow_texture(struct pipe_context *pctx, } shadow->writes = orig->writes; + orig->base.sync_status = 0; } static struct pipe_surface * diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c index 1c72dc4af0d..1ac9e8fc1d9 100644 --- a/src/gallium/drivers/v3d/v3d_screen.c +++ b/src/gallium/drivers/v3d/v3d_screen.c @@ -47,6 +47,42 @@ #include "compiler/v3d_compiler.h" #include "drm-uapi/drm_fourcc.h" +#ifdef HAVE_WAYLAND_PLATFORM +#include <wayland-client.h> +#endif + +#ifdef HAVE_X11_PLATFORM +#include <xcb/xcb.h> +#endif + +static bool +check_x_session() +{ + bool xcb_connection = false; + +#ifdef HAVE_WAYLAND_PLATFORM + struct wl_display *display; + + display = wl_display_connect(NULL); + + if (display) { + wl_display_disconnect(display); + return xcb_connection; + } +#endif + +#ifdef HAVE_X11_PLATFORM + xcb_connection_t *conn; + + conn = xcb_connect(NULL, NULL); + + if (!xcb_connection_has_error(conn)) + xcb_connection = true; + xcb_disconnect(conn); +#endif + return xcb_connection; +} + static const char * v3d_screen_get_name(struct pipe_screen *pscreen) { @@ -828,6 +864,28 @@ v3d_screen_create(int fd, const struct pipe_screen_config *config, screen->has_cache_flush = v3d_has_feature(screen, DRM_V3D_PARAM_SUPPORTS_CACHE_FLUSH); screen->has_perfmon = v3d_has_feature(screen, DRM_V3D_PARAM_SUPPORTS_PERFMON); + + screen->has_x_session = check_x_session(); + + screen->ignore_scanout_usages = getenv("V3D_IGNORE_SCANOUT_USAGES"); + + const char *ignore_scanout_usages_with_modifiers_name = + "v3d_ignore_scanout_usages_with_modifiers"; + screen->ignore_scanout_usages_with_modifiers = + driCheckOption(config->options, + ignore_scanout_usages_with_modifiers_name, + DRI_BOOL) && + driQueryOptionb(config->options, + ignore_scanout_usages_with_modifiers_name); + + const char *maintain_ignorable_scanout_name = + "v3d_maintain_ignorable_scanout"; + screen->maintain_ignorable_scanout = + driCheckOption(config->options, + maintain_ignorable_scanout_name, + DRI_BOOL) && + driQueryOptionb(config->options, + maintain_ignorable_scanout_name); v3d_fence_init(screen); diff --git a/src/gallium/drivers/v3d/v3d_screen.h b/src/gallium/drivers/v3d/v3d_screen.h index 9bf2a065487..afdce3f3c73 100644 --- a/src/gallium/drivers/v3d/v3d_screen.h +++ b/src/gallium/drivers/v3d/v3d_screen.h @@ -82,6 +82,12 @@ struct v3d_screen { bool has_cache_flush; bool has_perfmon; bool nonmsaa_texture_size_limit; + bool ignore_scanout_usages; + bool ignore_scanout_usages_with_modifiers; + bool maintain_ignorable_scanout; + + /* Are we running in an X session? */ + bool has_x_session; struct v3d_simulator_file *sim_file; }; diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index c96a387bab8..708bb2fad4f 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -572,6 +572,10 @@ struct pipe_resource unsigned usage:8; /**< PIPE_USAGE_x (not a bitmask) */ unsigned bind; /**< bitmask of PIPE_BIND_x */ unsigned flags; /**< bitmask of PIPE_RESOURCE_FLAG_x */ + + /* Hack for avoiding sync on v3d */ + unsigned sync_condition; + unsigned sync_status; /** * For planar images, ie. YUV EGLImage external, etc, pointer to the diff --git a/src/glx/dri_common.h b/src/glx/dri_common.h index 455e8541ed8..1fe78e73b75 100644 --- a/src/glx/dri_common.h +++ b/src/glx/dri_common.h @@ -56,6 +56,10 @@ extern struct glx_config *driConvertConfigs(const __DRIcoreExtension * core, const __DRIconfig ** configs); extern void driDestroyConfigs(const __DRIconfig **configs); + +#ifndef __GLXDRIdrawable +typedef struct __GLXDRIdrawableRec __GLXDRIdrawable; +#endif extern __GLXDRIdrawable * driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable); diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 6de28f39112..ece789148d8 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1021,6 +1021,9 @@ struct gl_texture_object /** GL_ARB_bindless_texture */ struct util_dynarray SamplerHandles; struct util_dynarray ImageHandles; + + /* Hack for avoiding sync on v3d */ + GLboolean SyncCondition; }; diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 3a3ea8aae94..eb1cb561012 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -275,6 +275,13 @@ set_tex_parameteri(struct gl_context *ctx, } switch (pname) { + case GL_SYNC_CONDITION: + if (!!texObj->SyncCondition == !!params[0]) + return GL_FALSE; + texObj->SyncCondition = !!params[0]; + return GL_TRUE; + case GL_SYNC_STATUS: + return GL_TRUE; case GL_TEXTURE_MIN_FILTER: if (!_mesa_target_allows_setting_sampler_parameters(texObj->Target)) goto invalid_dsa; diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 599d2099d6f..9fbab50c1d7 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -3620,6 +3620,12 @@ st_TexParameter(struct gl_context *ctx, */ st_texture_release_all_sampler_views(st, stObj); break; + case GL_SYNC_CONDITION: + stObj->pt->sync_condition = texObj->SyncCondition; + break; + case GL_SYNC_STATUS: + stObj->pt->sync_status = 1; + break; default: ; /* nothing */ } diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf index 7e155d3e690..f0f3cadfb02 100644 --- a/src/util/00-mesa-defaults.conf +++ b/src/util/00-mesa-defaults.conf @@ -625,6 +625,7 @@ TODO: document the other workarounds. <application name="mutter" executable="mutter"> <option name="adaptive_sync" value="false" /> <option name="v3d_nonmsaa_texture_size_limit" value="true" /> + <option name="v3d_maintain_ignorable_scanout" value="true" /> </application> <application name="muffin" executable="muffin"> <option name="adaptive_sync" value="false" /> @@ -676,6 +677,7 @@ TODO: document the other workarounds. </application> <application name="Xorg" executable="Xorg"> <option name="v3d_nonmsaa_texture_size_limit" value="true" /> + <option name="v3d_ignore_scanout_usages_with_modifiers" value="true" /> </application> <application name="gfxbench" executable="testfw_app"> diff --git a/src/util/driconf.h b/src/util/driconf.h index 24726e04bd3..9f2ab7581c6 100644 --- a/src/util/driconf.h +++ b/src/util/driconf.h @@ -480,6 +480,14 @@ DRI_CONF_OPT_B(v3d_nonmsaa_texture_size_limit, def, \ "Report the non-MSAA-only texture size limit") +#define DRI_CONF_V3D_IGNORE_SCANOUT_USAGES_WITH_MODIFIERS(def) \ + DRI_CONF_OPT_B(v3d_ignore_scanout_usages_with_modifiers, def, \ + "Ignore SCANOUT usage on resource allocations with modifiers.") + +#define DRI_CONF_V3D_MAINTAIN_IGNORABLE_SCANOUT(def) \ + DRI_CONF_OPT_B(v3d_maintain_ignorable_scanout, def, \ + "Maintain SCANOUT usage on resource allocations when the environment allows ignoring SCANOUT usage.") + /** * \brief virgl specific configuration options */
  • 0 Votes
    4 Posts
    443 Views
    T

    I realized I can use my USB2-A meter to test the output from the USB2 ports. Problematic PSU causes it to have 5.3V and the better one has 5.1V. Hopefully it helps anyone else having problems with a stronger PSU.